package com.winter.Controller;

import com.winter.model.FinContentLikeInfo;
import com.winter.service.LikeService;
import com.winter.util.Result;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "v1/like")
public class LikeController {

    @Autowired
    private LikeService likeService;

    @PostMapping
    public Result insertLike(@RequestBody FinContentLikeInfo finContentLikeInfo) {
        return likeService.insertLike(finContentLikeInfo);
    }

    @DeleteMapping
    public Result deleteLike(String type, String chiType, Long id, String userNo) {
        return likeService.deleteLike(type, chiType, id, userNo);
    }

    
}
